<template>
    <el-card>
        <Edit ref="editForm" type="15" />
        <el-button class="mt10" type="primary" @click="onSubmit">保 存</el-button>
    </el-card>
</template>

<script>
import Edit from '@/views/components/edit.vue'
import { addDownload } from '@/api/index'
export default {
    name: 'AddDownload',
    components: { Edit },
    data() {
        return {
        }
    },
    async created() {

    },
    methods: {
        async onSubmit() {
            let form = await this.$refs.editForm.validate()
            await addDownload(form)
            this.$message({
                type: 'success',
                message: '成功'
            })
            this.$router.push('/download')
        }
    }
}
</script>
